<?php

namespace App\Http\Controllers\admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
class LogoController extends Controller
{
    public function index()
    {
    	$list = DB::table('logo')->get();
    	return view('admin.logo',['list'=>$list]);
    }
    public function set(Request $Request)
    {
    	$id = $Request->input('id');
    	$set = $Request->input('set');
    	if ($set == 0) {
    		$data = array('set'=>'1');
    		DB::table('logo')->where('id',$id)->update($data);
    	}else{
    		$data = array('set'=>'0');
    		DB::table('logo')->where('id',$id)->update($data);
    	}
    	$list = DB::table('logo')->get();
    	return view('admin.logo',['list'=>$list]);
    }
}
